package com.hangsu.train.core.result;

public enum Err {

    // GLOBAL
    OK(200, "成功"),
    ERR(500, "系统错误"),
    UNAUTH(401, "登录失败或者没有权限"),
    PARAM_VALIDATE_ERROR(400, "入参错误"),

    // 登录注册
    AUTHED_LOGIN_ERROR(10000, "用户名或者密码错误"),
    AUTHED_USER_DISABLE(10001, "用户被禁用请联系管理员"),
    ;

    private final int code;
    private final String message;

    Err(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
